package com.project.bean;

import java.time.LocalDateTime;

/**
 * 回帖类
 */
public class ReplyBean {
    private  int id;
    private  String title;
    private  String content;
    private LocalDateTime date=LocalDateTime.now();
    private  PostBean post;
    private  UserBean user;

    @Override
    public String toString() {
        return "ReplyBean{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", date=" + date +
                ", post=" + post +
                ", user=" + user +
                "}\n";
    }

    public ReplyBean(String title, String content,  int postId, int userId) {
        this.title = title;
        this.content = content;
        this.user=new UserBean();
        this.user.setId(userId);
        this.post=new PostBean();
        this.post.setId(postId);
    }

    public ReplyBean() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public LocalDateTime getDate() {
        return date;
    }

    public void setDate(LocalDateTime date) {
        this.date = date;
    }

    public PostBean getPost() {
        return post;
    }

    public void setPost(PostBean post) {
        this.post = post;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }
}
